<%@ page language="java" pageEncoding="UTF-8"%>
<div class="container">
	<ol class="breadcrumb">
		<li>
			<a href="#/">首页</a>
		</li>
		<li>
			<a href="#/manage">后台管理</a>
		</li>
		<li ng-show="mainMenu!=null">
			{{mainMenu.name}}
		</li>
	</ol>
	<div class="row">
        <div class="col-sm-3 col-md-3">
            <div class="panel-group">
                <div class="panel panel-default" ng-repeat="menu in menus">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" href="#collapse_{{$index}}">
                            	<i ng-class="menu.icon"></i> {{menu.name}} <span class="badge pull-right">{{menu.children.length}}</span></a>
                        </h4>
                    </div>
                    <div id="collapse_{{$index}}" class="panel-collapse collapse" ng-class="{'in':mainMenu.parent==menu.id}"> <!-- 带 in 表示展开 -->
                        <div class="panel-body">
                            <table class="table">
                                <tbody>
	                                <tr ng-repeat="children in menu.children">
	                                    <td>
	                                       <a style="color: black;cursor:pointer;" ng-click="forword(children);"><i ng-class="children.icon"></i> {{children.name}}</a>
											<span class="pull-right" ng-show="mainMenu.id==children.id">
												<i class="glyphicon glyphicon-chevron-right"></i>
											</span>
										</td>
	                                </tr>
                            	</tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>	
        <div class="col-sm-9 col-md-9" src="mainMenu.include_path" ng-include>
        </div>
    </div>
</div>